The present invention relates to mirror split operations conducted by the controllers of various types of data storage devices. The described embodiment relates to disk-array data-storage devices and disk-array controllers. Therefore, a concise background of disk and disk-array technologies is provided below.
FIG. 1 is a block diagram of a standard disk drive. The disk drive 101 receives I/O requests from remote computers via a communications medium 102 such as a computer bus, fibre channel, or other such electronic communications medium. For many types of storage devices, including the disk drive 101 illustrated in FIG. 1, the vast majority of I/O requests are either READ or WRITE requests. A READ request requests that the storage device return to the requesting remote computer some requested amount of electronic data stored within the storage device. A WRITE request requests that the storage device store electronic data furnished by the remote computer within the storage device. Thus, as a result of a READ request carried out by the storage device, data is returned via communications medium 102 to a remote computer, and as a result of a write request, data is received from a remote computer by the storage device via communications medium 102 and stored within the storage device.
The disk drive storage device illustrated in FIG. 1 includes controller hardware and logic 103 including electronic memory, one or more processors or processing circuits, and controller firmware, and also includes a number of disk platters 104 coated with a magnetic medium for storing electronic data. The disk drive contains many other components not shown in FIG. 1, including read/write heads, a high-speed electronic motor, a drive shaft, and other electronic, mechanical, and electromechanical components. The memory within the disk drive includes a request/reply buffer 105, which stores I/O requests received from remote computers, and an I/O queue 106 that stores internal I/O commands corresponding to the I/O requests stored within the request/reply buffer 105. Communication between remote computers and the disk drive, translation of I/O requests into internal I/O commands, and management of the I/O queue, among other things, are carried out by the disk drive I/O controller as specified by disk drive I/O controller firmware 107. Translation of internal I/O commands into electromechanical disk operations, in which data is stored onto, or retrieved from, the disk platters 104, is carried out by the disk drive I/O controller as specified by disk media read/write management firmware 108. Thus, the disk drive I/O control firmware 107 and the disk media read/write management firmware 108, along with the processors and memory that enable execution of the firmware, compose the disk drive controller.
Individual disk drives, such as the disk drive illustrated in FIG. 1, are normally connected to, and used by, a single remote computer, although it has been common to provide dual-ported disk drives for use by two remote computers and multi-port disk drives that can be accessed by numerous remote computers via a communications medium such as a fibre channel. However, the amount of electronic data that can be stored in a single disk drive is limited. In order to provide much larger-capacity electronic data-storage devices that can be efficiently accessed by numerous remote computers, disk manufacturers commonly combine many different individual disk drives, such as the disk drive illustrated in FIG. 1, into a disk array device, increasing both the storage capacity as well as increasing the capacity for parallel I/O request servicing by concurrent operation of the multiple disk drives contained within the disk array.
FIG. 2 is a simple block diagram of a disk array. The disk array 202 includes a number of disk drive devices 203, 204, and 205. In FIG. 2, for simplicity of illustration, only three individual disk drives are shown within the disk array, but disk arrays may contain many tens or hundreds of individual disk drives. A disk array contains a disk array controller 206 and cache memory 207. Generally, data retrieved from disk drives in response to READ requests may be stored within the cache memory 207 so that subsequent requests for the same data can be more quickly satisfied by reading the data from the quickly accessible cache memory rather than from the much slower electromechanical disk drives. Various elaborate mechanisms are employed to maintain, within the cache memory 207, data that has the greatest chance of being subsequently re-requested within a reasonable amount of time. The data contained in WRITE requests may also be stored first in cache memory 207, in the event that the data may be subsequently requested via READ requests or in order to defer slower writing of the data to physical storage medium.
Electronic data is stored within a disk array at specific addressable locations. Because a disk array may contain many different individual disk drives, the address space represented by a disk array is immense, generally many thousands of gigabytes to tens or hundreds of terabytes. The overall address space is normally partitioned among a number of abstract data storage resources called logical units (“LUNs”). A LUN includes a defined amount of electronic data storage space, mapped to the data storage space of one or more disk drives within the disk array, and may be associated with various logical parameters including access privileges, backup frequencies, and mirror coordination with one or more LUNs. LUNs may also be based on random access memory (“RAM”), mass storage devices other than hard disks, or combinations of memory, hard disks, and/or other types of mass storage devices. Remote computers generally access data within a disk array through one of the many abstract LUNs 208-215 provided by the disk array via internal disk drives 203-205 and the disk array controller 206. Thus, a remote computer may specify a particular unit quantity of data, such as a byte, word, or block, using a bus communications media address corresponding to a disk array, a LUN specifier, normally a 64-bit integer, and a 32-bit, 64-bit, or 128-bit data address that specifies a LUN, and a data address within the logical data address partition allocated to the LUN. The disk array controller translates such a data specification into an indication of a particular disk drive within the disk array and a logical data address within the disk drive. A disk drive controller within the disk drive finally translates the logical address to a physical medium address. Normally, electronic data is read and written as one or more blocks of contiguous 32-bit or 64-bit computer words, the exact details of the granularity of access depending on the hardware and firmware capabilities within the disk array and individual disk drives as well as the operating system of the remote computers generating I/O requests and characteristics of the communication medium interconnecting the disk array with the remote computers.
In many computer applications and systems that need to reliably store and retrieve data from a mass storage device, such as a disk array, a primary data object, such as a file or database, is normally backed up to backup copies of the primary data object on physically discrete mass storage devices or media so that if, during operation of the application or system, the primary data object becomes corrupted, inaccessible, or is overwritten or deleted, the primary data object can be restored by copying a backup copy of the primary data object from the mass storage device. Many different techniques and methodologies for maintaining backup copies have been developed. In one well-known technique, a primary data object is mirrored. FIG. 3 illustrates object-level mirroring. In FIG. 3, a primary data object “O3” 301 is stored on LUN A 302. The mirror object, or backup copy, “O3” 303 is stored on LUN B 304. The arrows in FIG. 3, such as arrow 305, indicate I/O write requests directed to various objects stored on a LUN. I/O WRITE requests directed to object “O3” are represented by arrow 306. When object-level mirroring is enabled, the disk array controller providing LUNs A and B automatically generates a second I/O write request from each I/O write request 306 directed to LUN A, and directs the second generated I/O write request via path 307, switch “S1” 308, and path 309 to the mirror object “O3” 303 stored on LUN B 304. In FIG. 3, enablement of mirroring is logically represented by switch “S1” 308 being on. Thus, when object-level mirroring is enabled, any I/O write request, or any other type of I/O request that changes the representation of object “O3” 301 on LUN A, is automatically mirrored by the disk array controller to identically change the mirror object “O3” 303. Mirroring can be disabled, represented in FIG. 3 by switch “S1” 308 being in an off position. In that case, changes to the primary data object “O3” 301 are no longer automatically reflected in the mirror object “O3” 303. Thus, at the point that mirroring is disabled, the stored representation, or state, of the primary data object “O3” 301 may diverge from the stored representation, or state, of the mirror object “O3” 303. Once the primary and mirror copies of an object have diverged, the two copies can be brought back to identical representations, or states, by a resync operation represented in FIG. 3 by switch “S2” 310 being in an on position. In the normal mirroring operation, switch “S2” 310 is in the off position. During the resync operation, any I/O operations that occurred after mirroring was disabled are logically issued by the disk array controller to the mirror copy of the object via path 311, switch “S2,” and pass 309. During resync, switch “S1” is in the off position. Once the resync operation is complete, logical switch “S2” is disabled and logical switch “S1” 308 can be turned on in order to reenable mirroring so that subsequent I/O write requests or other I/O operations that change the storage state of primary data object “O3,” are automatically reflected to the mirror object “O3” 303.
In many data storage devices, including disk arrays, mirroring is conducted by a disk array controller on a per-LUN basis. A LUN may be mirrored for various reasons, including for preparation of a backup copy of a primary LUN that can be used for database backup and for archival purposes. For these purposes, a LUN may be mirrored for some interval of time, and the mirroring may then be disabled, or, in other words, the mirrored LUN pair may then be split, so that the backup LUN of a the primary-LUN/backup-LUN mirror pair can be used as a consistent snapshot of the data state of the primary LUN at the point in time that mirroring is disabled. Thus, the mirroring capability built into disk array controllers and controllers of other types of data storage devices can be exploited as an efficient data backup mechanism by database management systems and other application programs.
Unfortunately, there are a number of significant deficiencies in using data-storage-device-based mirroring for generating backup copies of primary LUNs by application programs and system routines running on a host computer. First, data storage devices cannot determine when a primary LUN or a backup LUN of a mirrored LUN pair is in a logically consistent state with respect to host-computer transaction processing, database management, or other such activities involving data maintenance. Logically consistent states may occur quite infrequently, and, therefore, a backup LUN generated by a mirror split operation is generally logically inconsistent. In some cases, the backup LUN can be repaired by backing out incomplete transactions, for example, to produce a logically consistent backup, but, in other cases, the backup LUN cannot be repaired. Another deficiency in using data-storage-device-based mirroring for generating backup copies is the overhead involved, from the perspective of an application program, in regularly directing splitting of a mirrored LUN pair, including overhead involved in managing backup LUNs and the overhead of sometimes lengthy unavailability of a primary LUN during the mirror split operation. For these reasons, designers and manufacturers of data storage devices, and developers of application programs and database management systems have recognized the need for a more convenient and efficient method for employing data-storage-device mirroring to generate backup LUNs for database backup, archival purposes, and for other purposes.